package com.qijian.maindata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qijian.maindata.domain.ProductionPlanDelay;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;

/**
 * 生产计划延期数据Mapper接口
 *
 * @author qijian
 * @date 2024-08-05
 */
public interface ProductionPlanDelayMapper extends BaseMapper<ProductionPlanDelay> {

    @Select("select max(version) from main_production_plan_delay")
    Long selectMaxVersion();

    @Update("truncate table main_production_plan_delay")
    boolean truncate();

    List<ProductionPlanDelay> selectDelayData(@Param("startTime") Date startTime);


}
